#pragma once
#include "WindowDataGrabber.h"
#include "afxcmn.h"
#include "Observers.h"
#include <vector>

class DataReceiver;
// MainDlg dialog

class MainDlg : public CDialog, public Observer
{
	struct Table
	{
		HWND h;
		UINT pos;
		DataReceiver *rec;

		Table(HWND hwnd, UINT p, DataReceiver *rec) 
		{
			this->rec = rec;
			this->h = hwnd;
			this->pos = p;
		}
	};


	DECLARE_DYNAMIC(MainDlg)

	WindowDataGrabber WDG;

public:
	MainDlg(CWnd* pParent = NULL);   // standard constructor
	virtual ~MainDlg();
	
	virtual void UpdateTable(HWND iHwnd, int iPlayersNum, int iStack, TCHAR *iDecision);

// Dialog Data
	enum { IDD = IDD_DIALOG2 };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual BOOL OnInitDialog();

	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedBtnAddTable();
	afx_msg void OnBnClickedBtnDelTable();
	afx_msg void OnBnClickedButton3();
	CListCtrl TableList;
	
	std::vector<Table> Windows;


	afx_msg void OnBnClickedButtonEdit();
	afx_msg void OnBnClickedButtonStart();
	afx_msg void OnBnClickedButtonStop();
};
